package com.chanzany.state.case1;

/**
 * @Author ChanZany
 * @Date 2021/10/20 14:10
 * @Version 1.0
 * 环境类
 */
public class ScoreContext {
    private AbstractState state;
    public ScoreContext(){
        this.state = new LowState(this);
    }

    public void setState(AbstractState state) {
        this.state = state;
    }

    public AbstractState getState() {
        return state;
    }
    public void add(int score){
        state.addScore(score);
    }
}
